package com.csi.mapper;

import com.csi.domain.Hotel;
import com.csi.domain.TravelAttraction;
import com.csi.domain.TravelPackage;
import com.csi.domain.Trip;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TravelMapper {
    /**
     * 查询不同类型
     * @return
     */
    List<String> findType();

    /**
     * 查询不同类型的旅游套餐
     * @param travel_package_type
     * @return
     */
    List<Map<String,Object>> findByType(@Param("travel_package_type") String travel_package_type);

    /**
     * 更新套餐数量
     *
     * @param peopleNum
     * @param travelPackageId
     * @return
     */
    int updated(@Param("peopleNum") Integer peopleNum, @Param("travelPackageId") long travelPackageId);

    /**
     * 更新套餐数量(取消)
     * @param peopleNum
     * @param travelPackageId
     * @return
     */
    int updatedCancel(@Param("peopleNum") Integer peopleNum, @Param("travelPackageId") long travelPackageId);

    /**
     * 查询旅游套餐详情
     * @param id
     * @return
     */
    TravelPackage packageInfo(@Param("id") Long id);

    Trip trip(@Param("travel_package_id") Long id);

    List<Map<String, Object>> findAll();

    String findName(long travelId);

    List<TravelPackage> findPackage(long travelId);

    Hotel travelHotel(@Param("id") Long id);

    List<TravelAttraction> travelAttraction(@Param("id") Long id);
}
